package com.fz.song.mcos.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fz.song.mcos.entity.McUser;
import com.fz.song.mcos.mapper.McUserMapper;
import com.fz.song.mcos.service.IMcUserCustomService;
import com.fz.song.mcos.service.IMcUserService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 宋发准
 * @since 2021-01-25
 */
@Service
public class McUserCustomServiceImpl extends ServiceImpl<McUserMapper, McUser> implements IMcUserCustomService {

    /**
     * 根据用户名字查询用户信息
     *
     * @param username
     * @return
     */
    public McUser getByUserName(String username) {
        LambdaQueryWrapper<McUser> query = Wrappers.lambdaQuery(McUser.class);
        return getOne(query);
    }
}
